package com.example.mybatisplusdemo.model.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户中心数据传输对象
 * </p>
 *
 * @author yangpengfei
 * @since 2025/01/27
 */
@Data
@ApiModel("用户中心数据")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class UserCenterDTO {

    @ApiModelProperty("用户基本信息")
    private UserInfo user;

    @ApiModelProperty("个性化推荐列表")
    private List<Recommendation> recommendations;

    @Data
    public static class UserInfo {
        @ApiModelProperty("用户ID")
        private String id;

        @ApiModelProperty("用户姓名")
        private String name;

        @ApiModelProperty("头像URL")
        private String avatarUrl;

        @ApiModelProperty("会员等级")
        private String level;

        @ApiModelProperty("积分")
        private Integer points;

        @ApiModelProperty("出行偏好标签")
        private List<String> travelPrefs;

        @ApiModelProperty("消费分析")
        private List<SpendingAnalysis> spendingAnalysis;

        @ApiModelProperty("联系方式")
        private String contact;

        @ApiModelProperty("邮箱")
        private String email;
    }

    @Data
    public static class SpendingAnalysis {
        @ApiModelProperty("价格区间标签")
        private String label;

        @ApiModelProperty("占比百分比")
        private Integer percentage;
    }

    @Data
    public static class Recommendation {
        @ApiModelProperty("推荐ID")
        private String id;

        @ApiModelProperty("推荐标题")
        private String title;

        @ApiModelProperty("推荐描述")
        private String description;

        @ApiModelProperty("推荐类别")
        private String category;

        @ApiModelProperty("优惠信息")
        private String discount;

        @ApiModelProperty("地点信息")
        private String location;

        @ApiModelProperty("有效期")
        private String duration;

        @ApiModelProperty("标签类型")
        private String tagType;
    }
}